package com.example.java_chatroom.service;

import com.example.java_chatroom.mapper.GroupChatMapper;
import com.example.java_chatroom.model.GroupChat;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GroupChatService {
    @Autowired
    private GroupChatMapper groupChatMapper;


    public GroupChat queryByTitle(Integer sessionId) {
       return groupChatMapper.queryByTitle(sessionId);
    }

    public void UpdateTitle(Integer sessionId, String title) {
        groupChatMapper.UpdateTitle(sessionId, title);
    }


    public void deleteChat(Integer sessionId) {
        groupChatMapper.deleteChat(sessionId);
    }
}
